<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function fun1(){
            window.alert("hello")
        }
        function fun2(){
            var res=window.prompt("hello，请输入姓名")
            console.log(res);
            
        }
        function fun3(){
            var res=window.confirm("确定要删除码")
            console.log(res)
        }
        function fun4(){
            window.setTimeout(function(){
                console.log("hello");
            },2000)
        }
        function funa(){
            history.back()
        }
        function funb(){
            //history.forward()
            history.go(1)
            //向前翻几页
        }
        function func(){
            location.href="https://ys.mihoyo.com/?utm_source=adbdsem&from_channel=adbdsem#/"
        }
        function funA(){
            window.sessionStorage.setItem("keya","valueA")
            window.localStorage.setItem("keyb","valueB")
        }
        function funB(){
            console.log(sessionStorage.getItem("keya"));
            console.log(localStorage.getItem("keyb"));
            
        }
        function funC(){
            sessionStorage.removeItem("keya")
            localStorage.removeItem("keyb")
        }
    </script>
</head>
<body>

    <button onclick="funA()">存储数据</button>
    <button onclick="funB()">读取数据</button>
    <button onclick="funC()">清空数据</button>

    <hr>

    <button onclick="func()">原神</button>


    
    <hr>

    <button onclick="funa()">上一页</button>
    <button onclick="funb()">下一页</button>



    <a href="https://ys.mihoyo.com/?utm_source=adbdsem&from_channel=adbdsem#/">原神</a>
    <hr>
    <button onclick="fun1()">信息提示框</button>
    <button onclick="fun2()">信息输入框</button>
    <button onclick="fun3()">信息确认框</button>
    <button onclick="fun4()">俩秒钟向控制台打印hello</button>
</body>
</html>